<template>
  <div>
    <div class="kong"></div>
    <div class="list">
      <ul>
        <li v-for="item in list" :key="item.id">
          <div class="item-img">
            <img :src="item.img" :alt="item.nm" />
          </div>
          <div class="item-text">
            <div class="item-tt">
              <div class="item-movie">{{ item.nm }}</div>
              <div class="tiem-shuzi">{{ item.wish }}<span>人想看</span></div>
              <div class="tiem-zhuyan">{{ item.cat }}</div>
              <div class="tiem-shijian">{{ item.pubDesc }}</div>
            </div>
            <div class="item-r">
              <div class="btu">{{ item.sc }}分</div>
            </div>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Jingdian",
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    axios.get("./json/jingdian.json").then((res) => {
      console.log(res);
      this.list = res.data.classicMovies.list;
    });
  },
};
</script>

<style lang="less" scoped>
.kong {
  width: 100%;
  height: 2px;
  background: #f0f0f0;
}
.list ul li {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30px;
  padding-top: 10px;
}

.list ul li .item-img {
  width: 18%;
  margin-left: 5px;
}

.list ul li .item-img img {
  width: 100%;
}

.list ul li .item-text {
  width: 75%;
  display: flex;
  justify-content: space-around;
  // border-bottom: 2px solid #f0f0f0;
  .item-r {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20%;
    .btu {
      color: #faaf00;
      font-size: 16px;
      font-weight: bold;
    }
  }
}

.list ul li .item-text .item-tt {
  width: 75%;
  .item-movie {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 0.1333rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
  .tiem-shuzi {
    font-size: 15px;
    color: #faaf00;
    margin-bottom: 0.1333rem;
    font-weight: bold;
    span {
      font-size: 13px;
      color: #666;
      font-weight: normal;
    }
  }
  .tiem-zhuyan {
    font-size: 13px;
    color: #666;
    margin-bottom: 0.08rem;
  }
  .tiem-shijian {
    font-size: 13px;
    color: #666;
    padding-top: 7px;
  }
}

.list ul li .item-text .item-btn {
  width: 30%;
}
</style>